package com.hnichr.ump.common.plan.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;
import java.util.List;


@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_plan_schedules")
@Schema(description = "重点工作表")
public class PlanSchedules extends UmpEntity {
    @Id
    @Generator
    @Column(name = "ID_", updatable = false,length = 64)
    @Schema(description = "ID")
    private String id;


    @Column(name = "PLAN_YEAR_",length = 4)
    @Schema(description = "计划年份")
    private String planYear;

    @Column(name = "SOURCE_",length = 64)
    @Schema(description = "分解来源")
    private String source ;

    @Column(name = "CATEGORY_",length = 64)
    @Schema(description = "工作大类")
    private String category ;

    @Column(name = "PRIORITY_",length = 1024)
    @Schema(description = "重点工作")
    private String priority ;

    @Schema(description = "完成标志")
    @Column(name = "COMPLETION_MARK_",length = 256)
    private String completionMark;

    @Column(name = "START_TIME_")
    @Schema(description = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTime;

    @Column(name = "END_TIME_")
    @Schema(description = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;

    @Column(name = "LEADER_NAME_",length = 64)
    @Schema(description = "分管领导")
    private String leaderName;

    @Transient
    @Schema(description = "主责部门")
    private List<PlanSchedulesDept> mgrDept;

    @Transient
    @Schema(description = "重点工作内容列表")
    private List<PlanScheduleContents> contentList;

}
